date_format = {
    'ymd': '{d.year}-{d.month}-{d.day}',
    'mdy': '{d.month}/{d.day}/{d.year}',
    'dmy': '{d.day}/{d.month}/{d.year}'
}

class MyDate:
    def __init__(self, year, month, day):
        self.year = year
        self.month = month
        self.day = day

    def __repr__(self):
        return "{0.year}-{0.month}-{0.day}".format(self)

    def __format__(self, format_spec):
        if format_spec == '':
            format_spec = 'ymd'

        fmd = date_format[format_spec]
        return fmd.format(d=self)

class Base:
    def __init__(self, name):
        self._name = name

    def __repr__(self):
        return "My name is {name}".format(name=self._name)

    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, value):
        self._name = value


if '__main__' == __name__:
    b = Base('alien')
    print(b)
    b.name = "owl"
    print(b)
